{if !empty($data.options)}
<select
        {foreach $data.attrs as $key => $attr}
    {if $key != 'value'}
    {$key}="{$attr}"
    {/if}
    {/foreach}
    >
    <option value="">请选择≡{$data.label}≡</option>
    {assign name="$data.attrs.value" value=":empty($data.attrs.value) ? []: explode(',', $data.attrs.value)"/}
    {foreach $data.options as $value => $title}
    {if !is_array($title)}
    <option value="{$value}" {if (in_array($value, $data.attrs.value))}selected{/if}>{$title}</option>
    {else}
    <optgroup label="{$value}">
        {foreach $title as $value1 => $title1}
        <option value="{$value1}" {if (in_array($value1, $data.attrs.value))}selected{/if}>{$title1}</option>
        {/foreach}
    </optgroup>
    {/if}
    {/foreach}
</select>
{/if}